package com.molin.IOtest.copyFileTest;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class Demo1 {
    public static void main(String[] args) throws IOException {
        FileInputStream fis=new FileInputStream("C:\\molin\\a.avi");
        FileOutputStream fos=new FileOutputStream("D:\\IdeaProjects\\BasicCode\\mIdeaTest\\src\\com\\molin\\IOtest\\copyFileTest\\a.avi");

        int b;
        //磁盘到内存fis，内存到磁盘fos
        while ((b=fis.read())!=-1){
            fos.write(b);
        }
        fis.close();
        fos.close();
    }
}
